#ifndef _ai_h_included_
#define _ai_h_included_
#include <d3dx9.h>
#include <d3d9.h>
#include <string>
#include "DXUtil.h"
#include "Model.h"
#include <vector>
#include <math.h>

class Model;

class AIMonster{

protected:
	Model* mModel;
	
	vector<Model*>* mTargets;
	
	float attackDist;
	Model* mCurtarget;
	float attackDelay;
	float curDelay;
	int curAnim;
	float degree;
	float rotSpeed;
	bool turning;
	float turnAngle;
	float turnVal;

public:

	static const int AttackAnim;
	static const int DeadAnim ;
	static const int StandAnim ;
	static const int MoveAnim ;
	bool mAttack;

	AIMonster(){ mModel = NULL;

	 mAttack = false;
	 mTargets = new vector<Model*>();
	 attackDist = 0.5f;
	 mCurtarget = NULL;
	 attackDelay = 1;
	 curDelay = 0.0f;
	 curAnim = StandAnim;
	 rotSpeed = 1.0f;
	 turning = false;
	 turnVal =0.0f;
	 turnAngle = 0.0f;
	}

	 void SetModel(Model* m);
	 vector<Model*>* GetTargets(){return mTargets;}

	 void Update(float pTime);//,Model* mModel, vector<Model*>* mTargets);
	 float get_angle_between_in_radians(D3DXVECTOR3* a, D3DXVECTOR3* b);
};


#endif